/*
 * DxfTable.java
 *
 * Created on 5 de Dezembro de 2007, 15:44
 *
 * To change this template, choose Tools | Template Manager
 * and open the template in the editor.
 */

package importadorDXF;

/**
 *
 * @author rafaelbuck
 */
public class DxfTable
    implements DxfInterface
{

    public boolean setGroup(short grpNr, float fval)
    {
        return false;
    }

    public boolean setGroup(short grpNr, String str)
    {
        switch(grpNr)
        {
        case 2: // '\002'
            name = str.toUpperCase();
            return true;

        case 100: // 'd'
            return true;
        }
        return false;
    }

    public boolean setGroup(short grpNr, int ival)
    {
        if(grpNr == 70)
        {
            flags |= (short)ival;
            return true;
        } else
        {
            return false;
        }
    }

    public boolean setGroup(short grpNr, short color)
    {
        return false;
    }

    public boolean finishRead(DxfFile file)
    {
        return true;
    }

    boolean isTerm()
    {
        return false;
    }

    public final boolean isReferenced()
    {
        return isUsed;
    }

    public final void setReferenced()
    {
        isUsed = true;
    }

    public final String getName()
    {
        return name;
    }

    public final short getFlags()
    {
        return flags;
    }

    /** Creates a new instance of DxfTable */
    public DxfTable()
    {
    }

    protected String name;
    protected short flags;
    private boolean isUsed;
}